package org.example.dialog.client;

import org.example.ai.result.Result;
import org.example.dialogue.form.MessageForm;
import org.example.dialogue.pojo.Conversations;
import org.example.dialogue.vo.MessageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.awt.image.DataBufferInt;
import java.util.List;

/**
 * @author zqtao
 */
@FeignClient(value = "service-dialogue")
public interface DialogFeignClient {

    @PostMapping("/dialogue/getMessages")
    Result<List<MessageVo>> getMessage(@RequestBody List<MessageForm> messageForms, @RequestParam Long userId, @RequestParam Integer initValue);

    @GetMapping("/dialogue/saveMessages/{userId}")
    Result<String> saveMessage(@PathVariable Long userId);

    @GetMapping("/conversations/getHistoryMessage/{userId}")
    Result<List<Conversations>> getHistoryMessage(@PathVariable Long userId);

    @GetMapping("/dialogue/initializeChat/{userId}")
    Result<Integer> initializeChat(@PathVariable Long userId);

    @DeleteMapping("/dialogue/deleteChat/{conversationId}")
    Result<String> deleteChat(@PathVariable Integer conversationId);
}
